<h1>Stranice</h1>
<p><?= $this->Html->link('+ Nova stranica', '/admin_pages/create', array('class'=>'button')) ?></p>

<table class="left entity">
    <tr>
        <th align="left" width="1%">Id</th>
        <th align="left">Naslov</th>
        <th width="1%"></th>
    </tr>
    <? if (empty($pages)): ?>
    <tr>
        <td colspan="4">Nema stranica.</td>
    </tr>
    <? else: ?>
        <? foreach ($pages as $page): ?>
        <? $page = $page['Page'] ?>
        <tr>
            <td><?= $page['id'] ?></td>
            <td><?= $this->Html->link($page['menu_label'], '/admin_pages/edit/' . $page['id']) ?></td>
            <td>
                <?= $this->Html->link('obriši', '/admin_pages/delete/' . $page['id'], array(
                    'class'   => 'action delete',
                    'confirm' => 'Da li želite da obrišete stranicu?'
                ))?>
            </td>
        </tr>
        <? endforeach; ?>
    <? endif ?>
    </table>